/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Eventos;

import InterfaceEI.JanelaPrincipal;
import Utils.Utilidades;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import javax.swing.JOptionPane;

/**
 *
 * @author Isabela
 */
public class EventoTextsField implements FocusListener{
    private JanelaPrincipal frame;

    public void setFrame(JanelaPrincipal frame) {
        this.frame = frame;
    }

    public void focusGained(FocusEvent e) {
        
    }

    public void focusLost(FocusEvent e) {
        
        if(e.getSource().equals(frame.getjTTamViga())){
            frame.eventoJTTamViga();
        }
        else if(e.getSource().equals(frame.getjTXViga())){
            frame.eventoJTxViga();
        }
        else if(e.getSource().equals(frame.getjTXConc())){
            frame.eventoTXConc();
        }
        else if(e.getSource().equals(frame.getjTForcaConc())){
            frame.eventoJTForcaConc();
        }
        else if(e.getSource().equals(frame.getjTtamDist())){
            frame.eventoJTTamDist();
        }
        else if(e.getSource().equals(frame.getjTXDist())){
            frame.eventoJTxDist();
        }
        else if(e.getSource().equals(frame.getjTForcaDist())){
            frame.eventoJTxForcaDist();
        }
        else if(e.getSource().equals(frame.getTextXMom())){
            frame.eventoTXMom();
        }
        else if(e.getSource().equals(frame.getjTForcaMom())){
            frame.eventoJTForcaMom();
        }
    }

}
